/*
**
**			Heroes IV
**	  Copyright 2001, The 3DO Company
**
**      dialog_teleporter_entrance.h
*/
// kill the 255+ character identifier warning.  Templates tend to exceed that easily.

#ifndef DIALOG_TELEPORTER_ENTRANCE_H_INCLUDED
#define DIALOG_TELEPORTER_ENTRANCE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>
#include "adventure_map.h"
#include "bitmap_group_ptr.h"
#include "bitmap_layer.h"
#include "buffer_window.h"
#include "buffer_window_ptr.h"
#include "game_window.h"
#include "handler.h"
#include "map_point_list.h"
#include "shared_ptr.h"
#include "town_ptr.h"

class t_adventure_frame;
class t_button;
class t_mini_map_marker_window; // Defined in dialog_teleporter_entrance.cpp
class t_scrollbar;
class t_text_window;


class t_dialog_teleporter_entrance : public t_window
{
public:
	t_dialog_teleporter_entrance ( t_window* parent );
    void init_dialog( t_adventure_frame* frame,  t_level_map_point_2d_list exit_points, std::vector<std::string>exit_names,
                    int selected_exit, std::string const& name_text, std::string const& intro_text );
    int get_selected_exit();

protected:

	t_bitmap_group_ptr                  m_bitmaps_ptr;
	std::vector<int>                    m_exit_level;
	t_bitmap_layer *                    m_exit_marker;
    std::vector<std::string>            m_exit_names;
	std::vector<t_text_window *>        m_exit_text_list;
	std::vector<t_screen_point>         m_screen_frame_points;
    std::vector<t_button *>             m_map_button_list;
	t_adventure_map_window *            m_map_window;
	t_bitmap_layer *                    m_map_frame_layer;
	t_window *                          m_map_frame_window;
	std::vector<t_mini_map_marker_window *> m_mini_map_list;
    int                                     m_mini_map_view_start_index;
	std::vector<t_window *>                 m_marker_window_list;
	std::vector<t_screen_point>             m_screen_exit_marker_points;
	t_scrollbar *                       m_scrollbar;
	int                                 m_selected_exit;

    void show_exits( int start_index );
    void close_click( t_button* button );
    void left_button_down( t_mouse_event const& event ); 
    void map_clicked( t_button* button, int index );
    void map_scrollbar_move( t_scrollbar* scrollbar, int value );
    void ok_click( t_button* button );
};

#endif // DIALOG_TELEPORTER_ENTRANCE_H_INCLUDED
